package com.blb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.blb.pojo.Student;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public interface StudentService extends IService<Student> {

    @Transactional(propagation = Propagation.REQUIRED)
    void updateRequired(long id, long age);

    @Transactional(propagation = Propagation.REQUIRED)
    void updateRequiredException(long id, long age);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void updateRequiresNew(long id, long age);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void updateRequiresNewException(long id, long age);

    @Transactional(propagation = Propagation.NESTED)
    void updateNested(long id, long age);

    @Transactional(propagation = Propagation.NESTED)
    void updateNestedException(long id, long age);

    @Transactional(propagation = Propagation.SUPPORTS)
    void updateSupports(long id, long age);

    @Transactional(propagation = Propagation.SUPPORTS)
    void updateSupportsException(long id, long age);

    @Transactional(propagation = Propagation.NOT_SUPPORTED)
    void updateNotSupportsException(long id, long age);

    @Transactional(propagation = Propagation.NOT_SUPPORTED)
    void updateNotSupports(long id, long age);

    @Transactional(propagation = Propagation.NEVER)
    void updateNever(long id, long age);

    @Transactional(propagation = Propagation.MANDATORY)
    void updateMandatory(long id, long age);
}
